<template>
  <el-input-number
      v-bind="vBind"
      v-model="defaultProps.row[item.prop]"
      :max="max"
      :min="min"
      ref="component"
      @change="rowUpdateEmitEvent(arguments,'change')"
  ></el-input-number>
</template>

<script lang="ts">
import {ComsCommonMixin} from "../mixins/ComsCommonMixin";
import typeOfUtils from "../../../utils/type-of-utils";
export default {
  name: 'InputNumber',
  mixins:[ComsCommonMixin],
  computed:{
    max() {
      let max = this.item.props?.max
      if (typeOfUtils.isFunction(max)) {
        return max(this.plusEventsFirstParam)
      }
      return max
    },
    min() {
      let min = this.item.props?.min
      if (typeOfUtils.isFunction(min)) {
        return min(this.plusEventsFirstParam)
      }
      return min
    },
  },
  methods: {
    initValue() {
      this.defaultProps.row[this.item.prop] = ''
    }
  }
}
</script>

<style lang="scss" scoped>
.el-input-number{
  width: 100%;
}
</style>
